package thread;

class StartDead  implements Runnable{
	public void run(){
		for (int i = 0; i < 5; i++) {
			System.out.println(Thread.currentThread().getName()+" "+i);
		}
	}
	public static void main(String[] args) throws InterruptedException {
		StartDead st=new StartDead();
		
		Thread stthread=new Thread(st,"newThread1");
	for (int i = 0; i < 50; i++) {
		System.out.println(Thread.currentThread().getName()+" "+i);
		if (i==20) {			
			stthread.start();
			System.out.println(stthread.isAlive());;
//			new Thread(st,"newThread1").run(); 
//			new Thread(st,"newThread2").start();
//			Thread.sleep(1);
//			new Thread(st,"newThread2").run();
			
		}
		if (!stthread.isAlive()) {
//			stthread.start();
			System.out.println(stthread.isAlive());
		}
		
	}	
	}
}